package com.example.fill;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;

import androidx.annotation.Nullable;

public class V2419 extends View {
    public V2419(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        paint.setColor(Color.BLUE);
        paint.setStyle(Paint.Style.FILL);
        paint.setStrokeWidth(20f);
        paint.setTextSize(80f);

        paint1.setColor(Color.BLACK);
    }
    private String txt = "19.73";
    private Paint paint = new Paint();
    private Paint paint1 = new Paint();

    private Rect rect = new Rect();
    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        canvas.drawText(txt,200,190,paint);
        paint.getTextBounds(txt,0,txt.length(),rect);
        canvas.drawRect(200,200,200+rect.width(),200+rect.height(),paint1);
    }
}
